import {Injectable} from '@angular/core';
import {BaseHttpService} from '../base-http.service';
import {Observable} from 'rxjs';

export interface MsdsLeak {
  peopleHandle: string;
  chemistryHandle: string;
  environmentHandle: string;
  msdsEntprId?: number;
  id?: number;
}


@Injectable({
  providedIn: 'root'
})
export class MsdsLeakHttpService {

  constructor(public http: BaseHttpService) {
  }


  /*新增msdsLeak 信息*/
  public addMsdsLeak(param: MsdsLeak): Observable<number> {
    return this.http.post('/msdsLeak', param, {needSuccessInfo: true});
  }

  /*修改msdsLeak信息*/
  public editMsdsLeak(param: MsdsLeak): Observable<void> {
    return this.http.put('/msdsLeak', param, {needSuccessInfo: true});
  }

  /*查询msdsLeak详情*/
  public getMsdsLeakDetail(msdsEntprId: number): Observable<MsdsLeak> {
    return this.http.get('/msdsLeak/' + msdsEntprId);
  }


}
